<?php defined('SMIT_PATH') or die('Access Denied');
/**
 *	apc.php - Alternative PHP Cache Driver
 *	This is Smit Matterhorn - Build 24109
 *	
 *
 * @author		The SmitBoard Team & Community
 * @license		GNU GPL v3
 * @link		http://smitboard.sf.net
 * @since		Matterhorn
 */
 
class cacheSlave extends cacheMaster
{
	public $driver = 'Alternative PHP Cache';
	public $driver_version = '1.0 PF';
	public $driver_author = 'Matix';

	public $dependency = 'apc';

	public function add($key, $value, $ttl = 0)
	{
		apc_store(md5($key), $value, $ttl);
	}

	public function get($key)
	{
		$data = apc_fetch(md5($key));
		return $data;
	}
	
	public function delete($key)
	{
		return apc_delete(md5($key));
	}
}

?>